package com.x.client.activity

import android.support.v7.widget.LinearLayoutManager
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.gg.baselibrary.BaseActivity
import com.gg.utils.StatusUtils
import com.gg.widget.navigationbar.DefaultNavigationBar
import com.x.client.R
import com.x.client.bean.Message
import com.x.client.utils.RouterClass
import kotlinx.android.synthetic.main.activity_recyclerview.*

/**
 * Creator : GG
 * Date    : 2018/6/8
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */
@Route(path = RouterClass.message)
class MessageActivity : BaseActivity() {

    private val adapter: MessageAdapter by lazy { MessageAdapter() }

    override fun getLayoutRes(): Int = R.layout.activity_recyclerview


    override fun initTitle() {
        super.initTitle()
        StatusUtils.setStatusTextColor(true, this)
        StatusUtils.setStatusBar(this, false, false)
        DefaultNavigationBar.Builder(this)
                .setMiddleText(getString(R.string.my_message))
                .setStatusBarHeight(StatusUtils.getStatusBarHeight(this))
                .setLeftIcon(R.drawable.ic_back_black)
                .setLeftClickListener(View.OnClickListener { finish() })
                .create()
    }

    override fun initView() {

        recyclerView.layoutManager = LinearLayoutManager(this)
        recyclerView.adapter = adapter


    }

    override fun initData() {
    }


    class MessageAdapter : BaseQuickAdapter<Message, BaseViewHolder>(R.layout.item_message, listOf()) {
        override fun convert(helper: BaseViewHolder?, item: Message?) {

        }

    }
}